<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<div id="u">

<dl class="top_u_dd">
	<s:if test="#session.username == null">
	<dd>
    <a id="menu" href="user/loginPage.action" name="login">登入</a>
    </dd>
    <dt>|</dt>
    <dd>
    <a id="menu" href="user/registerPage.action" name="regist">注册</a>
    </dd>
   
	</s:if>
	<s:else>
	
	<s:bean var="user_auth" name="com.prp.struts.bean.UserAuth">
		<s:param name="username" value="#session.username"/>
	</s:bean>
	<dd>
	<label id = "menu"><s:property value="#session.username"/></label>
    	</dd>
    	<dt>|</dt>
    	<dd>
    	<a id = "menu" href="user/changePasswordPage.action" name="login">用户设置</a>
    	</dd>
    	<s:if test="#user_auth.is_UserAdmin">
 	  	<dt>|</dt>
 	  	<dd>
    	<a id = "menu" href="admin/userlist.action" name="regist">用户管理</a>
    	</dd>
    	</s:if>
    	
    	<s:if test="#user_auth.is_FileAdmin">
      	 	<dt>|</dt>
      	<dd>
		<a id="menu" href="file/file_list_admin.action" name="ad_search" >文件管理</a>
		</dd>
		</s:if>
		 	
         	<dt>|</dt>
		<dd>
		<a id = "menu" href="user/logout.action" name="ad_search" >退出</a> 
		</dd>
	</s:else>
	 	<dt>|</dt>
	<dd>
	
	<s:include value="/langselect.jsp"/>
	</dd>
	</dl>
 </div>	
  

